<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="com.adams.access.db.bean.User" language="java"  %>
    <%@page import="com.adams.access.db.bean.Role" language="java"  %>
    <%@page import="com.adams.access.db.bean.Right" language="java"  %>
    <%@page import="com.adams.common.Constants" language="java"  %>
    <%@page import="java.util.Iterator" language="java"  %>
    <%@page import="java.util.Set" language="java"  %>
     <%@page import="org.springframework.security.context.SecurityContextHolder" language="java"  %>
      <%@page import="org.springframework.security.userdetails.UserDetails" language="java"  %>
            <%@page import=" com.adams.security.dao.VASUser" language="java"  %>
   
    <%@ taglib uri="http://jawr.net/tags" prefix="jwr" %>
<%
	String path = request.getContextPath();
	User user = (User) request.getSession().getAttribute("user");
	String userName=null;
	UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext()
    .getAuthentication()
    .getPrincipal();
	userName=userDetails.getUsername();
	boolean hasAdvancedSearchManageRight=false;
	if (user != null ) {
		
		Role role = user.getRole();
		if(null != role){
			Set<Right> rights = role.getRights();
			if(null!=rights){
				for(Iterator<Right> it=rights.iterator();it.hasNext();){
					Right right = it.next();
					if(null!=right && Constants.RIGHT_CODE_ADVANCED_SEARCH_MANAGE.equals(right.getRightCode())){
						hasAdvancedSearchManageRight = true;
						break;
					}
				}
			}
		}
	}
	
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>业务管理平台</title>
<%--<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"/>
<link rel="Bookmark" href="images/favicon.ico" type="image/x-icon"/>
--%><script>
var webPath='<%=path%>';
var userName='<%=userName%>';
<%
	if(Constants.SUPER_USER_NAME.equals(userName) || hasAdvancedSearchManageRight){
		out.println("var advancedSearchManageRightFlag = true;");
	}else{
		out.println("var advancedSearchManageRightFlag = false;");
	}
%>
var withAdvancedSearch = true; //显示高级搜索下拉框
var CONFIG_LL_HEADER = false;
</script>

<jwr:style src="/bundles/extJs.css" />
<jwr:style src="/bundles/apps.css" />
<jwr:script src="/bundles/extJs.js"/> 
<jwr:script src="/bundles/common.js"/> 
<jwr:script src="/bundles/component.js"/> 
<jwr:script src="/bundles/customize.js"/> 
<jwr:script src="/bundles/init.js"/> 


<script>
document.write("<iframe id='downloadFrame'  style='display: none'></iframe> ");
</script>
</head>
<body>
</body>
</html>
